/**
 * Copyright (c) 2008 michiyasu wada
 * http://www.seyself.com/
 * 
 * Distributed under The MIT License.
 * [http://www.opensource.org/licenses/mit-license.php]
 */

package demo.modules.parameters 
{


public class Margin 
{
    public var top:Number;
    public var bottom:Number;
    public var left:Number;
    public var right:Number;
    
    public function get width():Number
    {
        return left + right;
    }
    
    public function get height():Number
    {
        return top + bottom;
    }
    
    public function get x():Number
    {
        return left;
    }
    
    public function get y():Number
    {
        return top;
    }
    
    public function Margin( top:Number=0, right:Number=0, bottom:Number=0, left:Number=0 ) 
    {
        this.top = top;
        this.bottom = bottom;
        this.left = left;
        this.right = right;
    }
    
    public function toString():String 
    {
        return "(top="+top+", "+"right="+right+", "+"bottom="+bottom+", "+"left="+left+")";
    }
    
}

}